/* normal */

body {
  background: #eee;
  color: #888;
  /* color is gray */
  border: 1px solid;
  height: 20px;
  padding: 6px;
  -webkit-animation: anim1 linear infinite;
}

.header,
.footer span {
  width: 100%;
  height: 20px;
  margin: 10px;
  font-size: 28px;
  animation: anim2 linear infinite;
}

.main {
  height: 400px;
}

.sidebar {
  margin: 0;
  height: 0;
  line-height: 0;
  width: 40px;
  -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.12);
  /* decimal */
  padding: 24.5px 24px 0;
  /* Data URI contains `px` */
  background: 24px 12px url();
}

@-webkit-keyframes anim1 {
  0%, 100% {
    -webkit-transform: none;
  }

  20%, 60% {
    -webkit-transform: rotate(-45deg);
  }

  40%, 80% {
    -webkit-transform: rotate(45deg);
  }
}

@keyframes anim2 {
  0% {
    height: 75px;
    width: 75px;
    border: 1px solid #ddd;
  }

  100% {
    height: 150px;
    width: 150px;
    border: 2px solid #ddd;
  }
}

/* media query */

@media only screen and (min-device-width: 241px) and (max-device-width: 360px) {
  /* normal */

  body {
    background: #eee;
    color: #888;
    /* color is gray */
    border: 1px solid;
    height: 20px;
    padding: 6px;
    -webkit-animation: anim3 linear infinite;
  }

  .header,
  .footer span {
    width: 100%;
    height: 20px;
    margin: 10px;
    font-size: 28px;
    animation: anim4 linear infinite;
  }

  .main {
    height: 400px;
  }

  .sidebar {
    margin: 0;
    height: 0;
    line-height: 0;
    width: 40px;
    -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.12);
    /* decimal */
    padding: 24.5px 24px 0;
    /* Data URI contains `px` */
    background: 24px 12px url();
  }

  .footer {
    height: 100px;
  }

@-webkit-keyframes anim3 {
    0%, 100% {
      -webkit-transform: none;
    }

    20%, 60% {
      -webkit-transform: rotate(-45deg);
    }

    40%, 80% {
      -webkit-transform: rotate(45deg);
    }
}

@keyframes anim4 {
    0% {
      height: 75px;
      width: 75px;
      border: 1px solid #ddd;
    }

    100% {
      height: 150px;
      width: 150px;
      border: 2px solid #ddd;
    }
}
}

.footer {
  height: 100px;
}